package com.ds.lens.data.vo.in;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;


@Data
public class Sort {
    public static final String ORDER_ASC = "asc";

    public static final String ORDER_DESC = "desc";

    @NotBlank(message = "Order field can not be empty!")
    private String field;

    @NotBlank(message = "Order can not be empty!")
    @Pattern(regexp = "^(asc|desc)$", message = "order must be asc or desc")
    private String order;

}
